package demo1;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ASUS
 * Date: 2023-10-16
 * Time: 18:05
 */
public class Test6 {
    public static void main(String[] args) {
        int a = 18;
        int b = 24;
        int c = a%b;
        while (c != 0){
            a = b;
            b = c;
            c = a% b;
        }
        System.out.println(b);
    }
}
